home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1997 January: Mac OS SDK / Dev.CD Jan 97 SDK1.toast / Development Kits (Disc 1) / PC Card Manager / CIncludes / DriverSynchronization.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-11-25  |  2.5 KB  |  116 lines  |  [TEXT/MPS ]

  1. /*
  2.      File:        DriverSynchronization.h
  3.  
  4.      Contains:    Driver Synchronization Interfaces.
  5.  
  6.      Version:    Sustem 8
  7.  
  8.      DRI:        Jonathan Sand
  9.  
  10.      Copyright:    © 1984-1996 by Apple Computer, Inc.
  11.                  All rights reserved.
  12.  
  13.      Warning:    *** APPLE INTERNAL USE ONLY ***
  14.                  This file may contain unreleased API's
  15.  
  16.      BuildInfo:    Built by:            SuperMario Build Daemon
  17.                  With Interfacer:    2.0d11   (PowerPC native)
  18.                  From:                DriverSynchronization.i
  19.                      Revision:        4
  20.                      Dated:            3/15/96
  21.                      Last change by:    jrs
  22.                      Last comment:    Move SynchronizeIO from DriverSupport.
  23.  
  24.      Bugs:        Report bugs to Radar component “System Interfaces”, “Latest”
  25.                  List the version information (from above) in the Problem Description.
  26.  
  27. */
  28. #ifndef __DRIVERSYNCHRONIZATION__
  29. #define __DRIVERSYNCHRONIZATION__
  30.  
  31. #ifndef __CONDITIONALMACROS__
  32. #include <ConditionalMacros.h>
  33. #endif
  34. #ifndef __TYPES__
  35. #include <Types.h>
  36. #endif
  37. #if FOR_SYSTEM8_PREEMPTIVE
  38. #ifndef __SYNCHRONIZATION__
  39. #include <Synchronization.h>
  40. #endif
  41. #endif
  42.  
  43. #ifdef __cplusplus
  44. extern "C" {
  45. #endif
  46.  
  47. #if PRAGMA_IMPORT_SUPPORTED
  48. #pragma import on
  49. #endif
  50.  
  51. #if PRAGMA_ALIGN_SUPPORTED
  52. #pragma options align=mac68k
  53. #endif
  54.  
  55. extern void SynchronizeIO(void );
  56.  
  57. extern Boolean CompareAndSwap(UInt32 oldVvalue, UInt32 newValue, UInt32 *OldValueAdr);
  58.  
  59. extern Boolean TestAndClear(UInt32 bit, UInt8 *startAddress);
  60.  
  61. #if FOR_SYSTEM7_ONLY
  62. extern Boolean TestAndSet(UInt32 bit, UInt8 *startAddress);
  63.  
  64. extern SInt8 IncrementAtomic8(SInt8 *value);
  65.  
  66. extern SInt8 DecrementAtomic8(SInt8 *value);
  67.  
  68. extern SInt8 AddAtomic8(SInt32 amount, SInt8 *value);
  69.  
  70. extern UInt8 BitAndAtomic8(UInt32 mask, UInt8 *value);
  71.  
  72. extern UInt8 BitOrAtomic8(UInt32 mask, UInt8 *value);
  73.  
  74. extern UInt8 BitXorAtomic8(UInt32 mask, UInt8 *value);
  75.  
  76. #endif
  77. extern SInt16 IncrementAtomic16(SInt16 *value);
  78.  
  79. extern SInt16 DecrementAtomic16(SInt16 *value);
  80.  
  81. extern SInt16 AddAtomic16(SInt32 amount, SInt16 *value);
  82.  
  83. extern UInt16 BitAndAtomic16(UInt32 mask, UInt16 *value);
  84.  
  85. extern UInt16 BitOrAtomic16(UInt32 mask, UInt16 *value);
  86.  
  87. extern UInt16 BitXorAtomic16(UInt32 mask, UInt16 *value);
  88.  
  89. extern SInt32 IncrementAtomic(SInt32 *value);
  90.  
  91. extern SInt32 DecrementAtomic(SInt32 *value);
  92.  
  93. extern SInt32 AddAtomic(SInt32 amount, SInt32 *value);
  94.  
  95. extern UInt32 BitAndAtomic(UInt32 mask, UInt32 *value);
  96.  
  97. extern UInt32 BitOrAtomic(UInt32 mask, UInt32 *value);
  98.  
  99. extern UInt32 BitXorAtomic(UInt32 mask, UInt32 *value);
  100.  
  101.  
  102. #if PRAGMA_ALIGN_SUPPORTED
  103. #pragma options align=reset
  104. #endif
  105.  
  106. #if PRAGMA_IMPORT_SUPPORTED
  107. #pragma import off
  108. #endif
  109.  
  110. #ifdef __cplusplus
  111. }
  112. #endif
  113.  
  114. #endif /* __DRIVERSYNCHRONIZATION__ */
  115.  
  116.